package com.blb.zy_community.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.SysRole;
import com.blb.zy_community.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.GrantedAuthority;

import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
public interface ISysUserService extends IService<SysUser> {

    Page<SysUser> GetUserById(Long current,Long size,String userName);

    Page<SysUser> SelectSysUserPage(Page<SysUser> page, String userName, String phonenumber, String status, String startTime,String endTime,Long deptId);

    /**
     * 用户管理-增加
     * @return
     */



    /**
     * 修改用户状态
     * @param statusId
     * @param userId
     */
    void updateStatus(Long statusId,Long userId);

    /**
     * 根据用户Id批量删除
     * @param userIds
     */
    void deleteSysUserIds(Long[] userIds);



    List<GrantedAuthority> getAuto(String username);


    void updateUserRoleAndPost(SysUser sysUser, List roleIds, List postIds);

    void updatePwd(Long userId,String password);

    SysUser getSysUserByUserName(String username);

    Page<SysUser> selectSysUserPage2(Page<Object> objectPage, String userName, String phonenumber, String status, String startTime, String endTime, Long deptId);
}
